import requestApi from 'src/erm/sscrppublic/common/components/requestApi'

import { ajax,toast } from 'nc-lightapp-front'
import presetVar from './presetVar'

let requestDomain = ''

let requestApiOverwrite = {
	...requestApi,
	//单据模板接口
	tpl: opt => {
		ajax({
			async: false,
			url: opt.url || `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountPullDefaultValueAction.do`,
			data: opt.data,
			success: opt.success
		})
	},
	query: opt => {
		ajax({
			url: `${requestDomain}/nccloud/erm/loanmanage/FysqToJKSearchAction.do`,
			data: opt.data,
			success: data => {
				data = data.data
				opt.success(data)
			}
		})
	},
	//判断 ExpenseaccountRelaSqValidateAction
	validateAction: opt => {
        ajax({
			url: `${requestDomain}/nccloud/erm/expenseaccount/ExpenseaccountRelaSqValidateAction.do`,
			data: opt.data,
			success: data => {
				
				opt.success(data)
			},
			
	
		})
    }
}

export default requestApiOverwrite
